import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/Layout/index.vue'
import dynamicRouter from './dynamic-router';


Vue.use(VueRouter)
console.log()
const routes = [

  {
    path: "/",
    name: 'layout',
    component: Layout,
    redirect: 'home',
    meta:{
      requiresAuth: false,
      title:'根路由'
    },
    children:[
        ...dynamicRouter
    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
